<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
    var a = 0;//白球
    var b = 0;//红球
    var c = 0;//黑球
    for(a = 0; a <= 23; a++){
        for(b = 0; b <= 23; b++){
            for(c = 0; c <= 20; c++){
                if(a+b==23&&b+c==20&&a+c==25)
                console.log(a,b,c);
            }
        }
    }
</script>
    <title>Document</title>
</head>
<body>
    
</body>
</html>